﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace My_LoadPE.PE
{
    public struct DosHeader
    {
        /// <summary>
        /// MZ缩写，魔法字，必须存在
        /// </summary>
        public uint MZSignature { get; set; }
        public uint UsedBytesInTheLastPage { get; set; }
        public uint e_cp { get; set; }
        public uint e_crlc { get; set; }
        public uint e_cparhdr { get; set; }
        public uint e_minalloc { get; set; }
        public uint e_maxalloc { get; set; }
        public uint e_ss { get; set; }
        public uint e_sp { get; set; }
        public uint e_csum { get; set; }
        public uint e_ip { get; set; }
        public uint e_cs { get; set; }
        public uint e_lfarlc { get; set; }
        public uint e_ovno { get; set; }
        public uint[] e_res { get; set; }
        public uint e_oemid { get; set; }
        public uint e_oeminfo { get; set; }
        public uint e_res2 { get; set; }
        /// <summary>
        /// PE头开始，值为偏移地址
        /// <para>默认地址为0x3C</para>
        /// </summary>
        public int AddressOfNewExeHeader { get; set; }
    }
}
